

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Edit AccountingBaseElement</title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
            <span class="menuButton"><g:link class="list" action="list">AccountingBaseElement List</g:link></span>
            <span class="menuButton"><g:link class="create" action="create">New AccountingBaseElement</g:link></span>
        </div>
        <div class="body">
            <h1>Edit AccountingBaseElement</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${accountingBaseElementInstance}">
            <div class="errors">
                <g:renderErrors bean="${accountingBaseElementInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form method="post" >
                <input type="hidden" name="id" value="${accountingBaseElementInstance?.id}" />
                <input type="hidden" name="version" value="${accountingBaseElementInstance?.version}" />
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="firstGrade">First Grade:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:accountingBaseElementInstance,field:'firstGrade','errors')}">
                                    <input type="text" id="firstGrade" name="firstGrade" value="${fieldValue(bean:accountingBaseElementInstance,field:'firstGrade')}" />
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="secondGrade">Second Grade:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:accountingBaseElementInstance,field:'secondGrade','errors')}">
                                    <input type="text" id="secondGrade" name="secondGrade" value="${fieldValue(bean:accountingBaseElementInstance,field:'secondGrade')}" />
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="thirdGrade">Third Grade:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:accountingBaseElementInstance,field:'thirdGrade','errors')}">
                                    <input type="text" id="thirdGrade" name="thirdGrade" value="${fieldValue(bean:accountingBaseElementInstance,field:'thirdGrade')}" />
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="elementName">Element Name:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:accountingBaseElementInstance,field:'elementName','errors')}">
                                    <input type="text" id="elementName" name="elementName" value="${fieldValue(bean:accountingBaseElementInstance,field:'elementName')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="isDefaultDebit">Is Default Debit:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:accountingBaseElementInstance,field:'isDefaultDebit','errors')}">
                                    <g:checkBox name="isDefaultDebit" value="${accountingBaseElementInstance?.isDefaultDebit}" ></g:checkBox>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="explanantionOfElement">Explanantion Of Element:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:accountingBaseElementInstance,field:'explanantionOfElement','errors')}">
                                    <textarea rows="5" cols="40" name="explanantionOfElement">${fieldValue(bean:accountingBaseElementInstance, field:'explanantionOfElement')}</textarea>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="generalLedgerAccounts">General Ledger Accounts:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:accountingBaseElementInstance,field:'generalLedgerAccounts','errors')}">
                                    
<ul>
<g:each var="g" in="${accountingBaseElementInstance?.generalLedgerAccounts?}">
    <li><g:link controller="generalLedgerAccount" action="show" id="${g.id}">${g?.encodeAsHTML()}</g:link></li>
</g:each>
</ul>
<g:link controller="generalLedgerAccount" params="['accountingBaseElement.id':accountingBaseElementInstance?.id]" action="create">Add GeneralLedgerAccount</g:link>

                                </td>
                            </tr> 
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" value="Update" /></span>
                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
